package com.group3.pojo.receive;

import com.group3.domain.File;
import com.group3.domain.StudentWork;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @ClassName WorkDetailReceive
 * @Author WenhaoChen
 * @Date 2021/7/8 16:06
 **/
@Data
public class WorkDetailReceive {
    private Integer studentId;

    private Integer workId;

    private String content;

    @ApiModelProperty(name = "state", value = "1：保存；2：提交；",
            dataType = "Integer")
    private Integer state;

    @ApiModelProperty(name = "files", value = "上传文件（files:[{'fileUrl':'','fileName':''},{'fileUrl':'','fileName':''},{...}]）",
            dataType = "File")
    private List<File> files;

    public StudentWork getStudentWork(){
        StudentWork studentWork = new StudentWork();

        studentWork.setState(state);
        studentWork.setContent(content);
        studentWork.setWorkId(workId);
        studentWork.setStudentId(studentId);

        return studentWork;
    }
}
